package com.stone.common.action;

/**
 * <pre>
 * 高频通道测试记录
 * @author
 * </pre>
 */

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.stone.common.pojo.AdvanceSearch;
import com.stone.common.service.AdvanceSearchService;
import com.stone.utils.StringUtils;

import frm.ssh.action.BaseListAction;

public class AdvanceSearchListAction extends BaseListAction {

	private static final long serialVersionUID = 3979577965804736350L;

	private AdvanceSearchService advanceSearchService;
	
	public AdvanceSearchService getAdvanceSearchService() {
		return advanceSearchService;
	}

	public void setAdvanceSearchService(AdvanceSearchService advanceSearchService) {
		this.service = advanceSearchService;
		this.advanceSearchService = advanceSearchService;
	}
	
    /** * 构造方法. */
    public AdvanceSearchListAction() {
        this.entityClass = AdvanceSearch.class;
    }

	/**
	 * 设置查询条件
	 */
	public HashMap<String, Object> setSearchCondition() {
		
		HashMap<String, Object> m = new HashMap<String, Object>();
		
		List<Object> valsList = new ArrayList<Object>();
		
		m.put("cols", " s as s");
		
		// 查询条件
		String conditions = " "; 
		
		// 模块名称编号
		if (!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon2())) {
			conditions += " s.modelId = ?";
			valsList.add(super.getSearchBean().getCon2());
		}
		

		// 查询条件
		m.put("conditions",conditions);
		m.put("clause", "order by modelId");
		m.put("alias", "s");//, TOrgan o
		m.put("vals", valsList.toArray());
		
	//	DictionaryService dicService = (DictionaryService) SpringUtil.getInstance().getBean("dicService");
	//	xslxList = dicService.findList("XSLX");
		
		return m;
		
	}

}
